/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Description: Pangea Libata Driver Vendor Hooks
 */

#ifdef CONFIG_VENDOR_USB_CORE_HOOKS
#undef TRACE_SYSTEM
#define TRACE_SYSTEM usb_core

#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOKS_USB_CORE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOKS_USB_CORE_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>

struct workqueue_struct;
struct usb_device;

DECLARE_HOOK(vendor_usb_state_notify,
	TP_PROTO(int state),
	TP_ARGS(state));

DECLARE_HOOK(vendor_hub_work_queue_process,
	TP_PROTO(struct workqueue_struct **hub_wq),
	TP_ARGS(hub_wq));

DECLARE_HOOK(vendor_hub_work_queue_backup,
	TP_PROTO(struct workqueue_struct *hub_wq),
	TP_ARGS(hub_wq));

DECLARE_HOOK(vendor_hub_port_ont,
	TP_PROTO(struct usb_device *udev, int port1, int devnum),
	TP_ARGS(udev, port1, devnum));

#endif

 /* This part must be outside protection */
#include <trace/define_trace.h>

#else

#include <linux/tracepoint.h>

struct workqueue_struct;
struct usb_device;

DECLARE_EVENT_NOP(vendor_usb_state_notify,
	TP_PROTO(int state),
	TP_ARGS(state));

DECLARE_EVENT_NOP(vendor_hub_work_queue_process,
	TP_PROTO(struct workqueue_struct **hub_wq),
	TP_ARGS(hub_wq));

DECLARE_EVENT_NOP(vendor_hub_work_queue_backup,
	TP_PROTO(struct workqueue_struct *hub_wq),
	TP_ARGS(hub_wq));

DECLARE_EVENT_NOP(vendor_hub_port_ont,
	TP_PROTO(struct usb_device *udev, int port1, int devnum),
	TP_ARGS(udev, port1, devnum));

#endif
